/**
 * @author dreamcatcher
 * @date 2022/5/4 9:48
 */
public class MainActivity extends Activity {

    @Override
    public void onCreate() {
        TextView textView = (TextView) findViewById("textview");
        textView.setOnClickListener(new TextView.ClickListener() {
            @Override
            public void onclick(View view) {
                System.out.println(view.getText() + "被点击了");
                System.out.println(view);
            }
        });


        Button button = (Button)findViewById("button");
        button.setOnClickListener(new TextView.ClickListener() {
            @Override
            public void onclick(View view) {
                System.out.println(view.getText() + "被点击了");
                System.out.println(view);
            }
        });
    }
}
